// 创建item
createItemsElement = () => {
  let rootDiv = document.createElement("div");
  rootDiv.id = "grid";
  for (let index = 1; index <= 100; index++) {
    const divItem = document.createElement("div");
    divItem.classList.add("item");
    divItem.dataset.id = index;
    divItem.innerHTML = index;
    rootDiv.append(divItem);
  }
  document.body.append(rootDiv);
};

createItemsElement();

const areaSelector = new AreaSelector({
  element: document.querySelector("#grid"),
  selectEl: ".item",
  selectElKey: "id",
  onChangeSelected: (list) => {
    console.log("select item in areaSelector", list);
  },
});

